
<!DOCTYPE html>
<html lang="zh">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>文件上传</title>
    <link rel="shortcut icon" href="../../nuoyi/favicon.ico">
    <link href="../../nuoyi/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../../nuoyi/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="../../nuoyi/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20210202" rel="stylesheet"/>
    <link href="../../nuoyi/css/animate.css" rel="stylesheet"/>
    <link href="../../nuoyi/css/style.css?v=20200903" rel="stylesheet"/>
    <link href="../../nuoyi/ruoyi/css/ry-ui.css?v=4.6.1" rel="stylesheet"/>


    <link href="../../nuoyi/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=20201202" rel="stylesheet"/>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>文件上传控件 <small>https://github.com/kartik-v/bootstrap-fileinput</small></h5>
                </div>
                <div class="ibox-content">
                    <div class="form-group">
                        <label class="font-noraml">简单示例</label>
                        <div class="file-loading">
                            <input class="file" type="file" id="input-id" multiple data-min-file-count="1" data-theme="fas">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script> var ctx = "\/"; var lockscreen = null; if(lockscreen){window.top.location=ctx+"lockscreen";} </script>
<a id="scroll-up" href="#" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
<script src="../../nuoyi/js/jquery.min.js"></script>
<script src="../../nuoyi/js/bootstrap.min.js"></script>
<!-- bootstrap-table 表格插件 -->
<script src="../../nuoyi/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20210202"></script>
<script src="../../nuoyi/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20210202"></script>
<script src="../../nuoyi/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js?v=20210202"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="../../nuoyi/ajax/libs/validate/jquery.validate.min.js"></script>
<script src="../../nuoyi/ajax/libs/validate/messages_zh.min.js"></script>
<script src="../../nuoyi/ajax/libs/validate/jquery.validate.extend.js"></script>
<!-- jquery-validate 表单树插件 -->
<script src="../../nuoyi/ajax/libs/bootstrap-treetable/bootstrap-treetable.js"></script>
<!-- 遮罩层 -->
<script src="../../nuoyi/ajax/libs/blockUI/jquery.blockUI.js"></script>
<script src="../../nuoyi/ajax/libs/iCheck/icheck.min.js"></script>
<script src="../../nuoyi/ajax/libs/layer/layer.min.js"></script>
<script src="../../nuoyi/ajax/libs/layui/layui.js"></script>
<script src="../../nuoyi/ruoyi/js/common.js?v=4.6.1"></script>
<script src="../../nuoyi/ruoyi/js/ry-ui.js?v=4.6.1"></script>


<script src="../../nuoyi/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=20201202"></script>

<script type="text/javascript">


    $("#input-id").fileinput({
        theme: 'zh',
        uploadUrl: '/uploadFile', // 上传的地址
        showCaption: true,//是否显示被选文件的简介
        showUpload: true,//是否显示上传按钮
        showRemove: true,//是否显示删除按钮
        showClose: true,//是否显示关闭按钮
        enctype: 'multipart/form-data',
        uploadAsync:false, //false 同步上传，后台用数组接收，true 异步上传，每次上传一个file,会调用多次接口
        layoutTemplates: {
            actionUpload: ''//就是让文件上传中的文件去除上传按钮
//      actionDelete: '',//去除删除按钮
        },
        browseClass: 'btn btn-primary',
        maxFileCount: 1,
        minFileCount : 1,
            }).on('filebatchuploadsuccess',function(res) {
        console.log(res);
        });

    $("#uploadfile").on("fileuploaded", function (event, data, previewId, index) {

    })

</script>
</body>
</html>
